<template>
  <view class="userInfoPage">
      <uni-card class="container" :title="userData.userName" :sub-title="userData.userAccount" :extra="userData.gender == 1 ? '男' : '女'" :thumbnail="userData.userAvatar">
        <text class="uni-body">{{`用户名：${userData.userName}\n`}}</text>
        <text class="uni-body">{{`角色：${userData.userRole}\n`}}</text>
        <text class="uni-body">{{`创建时间：${userData.createTime}\n`}}</text>
        <text class="uni-body">{{`更新时间：${userData.createTime}\n`}}</text>
      </uni-card>
  </view>
</template>

<script lang="ts">
import Vue from 'vue';
import {getCurrentUserUsingGet} from "@/servers/api/userController";

export default Vue.extend({
  data() {
    return {
      title: 'userinfo',
      userData: {} as API.UserVO
    }
  },
  async onLoad() {
    const userData = await getCurrentUserUsingGet() as API.UserVO;
    if (userData) {
      this.userData = userData
    }
  },
  methods: {}
});
</script>

<style>
.userInfoPage{
  width: 100%;
}
.container{
  //width: 100%;
  //height: 500px;
  margin: 5px auto;
}
.content {
}

.logo {
  height: 200rpx;
  width: 200rpx;
  margin: 200rpx auto 50rpx auto;
}

.text-area {
  display: flex;
  justify-content: center;
}

.title {
  font-size: 36rpx;
  color: #8f8f94;
}
</style>
